#include <iostream>
#include "tcp/Socket.h"
#include <arpa/inet.h>
#include "unistd.h"


#define SERVER_PORT 8200


int main() {
    std::string message;

    std::cin >> message;

    Socket socket_(socket(AF_INET, SOCK_STREAM, 0));
    InetAddress clientAddr("175.178.51.126", 8200);

    if(connect(socket_.fd(), clientAddr.getSockAddr(), sizeof(* clientAddr.getSockAddr())) == -1){
        std::cout << "结束" << std::endl;
    }

    write(socket_.fd(), message.c_str(), message.size());

    std::cout << "Hello, World!" << std::endl;
    return 0;
}
